<template>
	<view>
		<button type="default" @click="getNums()">点击</button>
		<view class="">{{list}}</view>
		<button type="default" @click="getImgs()">点击</button>
		<view class="" >
			<image :src="v" v-if="imgs" v-for="v,i in imgs" mode="" @click="getimage(v)"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'你好',
				list:'',
				imgs:[]
			}
		},
		methods: {
			getNums:function(){
				uni.showToast({
					title:'测试消息提示',
					icon:'fail',
					mask:true,
					duration:3000
				})
			},
			getImgs:function(){
				const that = this
				uni.chooseImage({
					success:function(res) {
						console.log(res.tempFilePaths)
						that.imgs = res.tempFilePaths
						console.log(that.imgs[0])
					},complete() {
						
					}
				})
			},
			getimage(current){
				uni.previewImage({
					current,
					urls:this.imgs
				})
			},
		
		}
	}
</script>

<style>
@import "../../common/uni.css";
</style>
